package videoExercises;

import java.util.HashSet;

public class Test2 {
    public static void main(String[] args) {

        Studengt1 a = new Studengt1("天天",18);
        Studengt1 b = new Studengt1("黎明",19);
        Studengt1 c = new Studengt1("王小",18);
        Studengt1 d = new Studengt1("黎明",19);

        HashSet<Studengt1> set=new HashSet<>();

        System.out.println(set.add(a));
        System.out.println(set.add(b));
        System.out.println(set.add(c));
        System.out.println(set.add(d));
        System.out.println(set);
    }
}
